home *** CD-ROM | disk | FTP | other *** search
- NAME
- graph - plot a tabulated function
-
- SYNOPSIS
- graph [file file file] [options]
-
- DESCRIPTION
- Graph takes pairs of points (two numbers per line) from the given
- file (or standard input) as x- and y- values and plots them on the
- screen, connected by straight lines. A string surrounded by quotes
- "..." may follow a pair of points, and will be displayed starting
- at that point. The program draws axes with convenient labels
- (integers times powers of 1000), plots the data, waits for a
- keypress, then resets the screen parameters and clears the screen
- before exiting. If data is taken from standard input (possibly
- redirected) the key pressed must be a carriage return. If graph is
- interrupted with a control-C, it may leave the display in a
- nonstandard mode. This can sometimes be fixed by running graph a
- second time and letting it exit normally.
-
- Blank lines and lines beginning with ';' are ignored.
-
- More than one input file can be specified. All the data will
- be read before scaling parameters are calculated. The plot
- will be "broken" at the end of each file. That is, there will
- be no line connecting the last point of the first file with the
- first point of the second file. Similarly, if a line starts
- with a null byte (that is, if a line feed is followed by a
- null) the plot will be broken. Separate curves may also be
- delimited with labels (see the -b switch).
-
- The -m switch can be used to select the line style or marker
- style for each curve. If both markers and connecting lines are
- wanted, read the data file twice and specify different styles.
- For example,
-
- graph gamma gamma -m 1 -30
-
- would give red squares connected by white solid lines.
-
-
- VERSIONS
- Graph is available in several versions. When necessary for
- configuration control, these versions are given different file
- names (see FILES section below). It is suggested that the
- "normal" version for a given computer be renamed GRAPH for
- simplicity. Two measures are taken to ensure no damage is
- done. First, any version of graph can be executed with a
- question mark as the only parameter:
-
- GRAPH ?
-
- It will then print a help screen which indicates the hardware
- it supports, and exit immediately. Second, graph tests that
- the hardware it needs is present before using it (except for
- the plotter and laser printer versions). The test is a
- permissive one, so that "clones" are likely to work. However,
- it can be fooled. For example, the Paradise EGA Autoswitch
- video card can emulate the Hercules monochrome graphics card,
- but only when connected to a monochrome monitor. If the
- Hercules version of graph is used with this card and an EGA
- color monitor, nothing is displayed.
-
- The following modes are supported on the IBM CGA:
- The mode is specified by setting the environment variable
- GRAPHICS before running graph:
-
- SET GRAPHICS=4 ; 200*320 color mode
- SET GRAPHICS=5 ; 200*320 grey scale mode
- SET GRAPHICS=6 ; 200*640 monochrome mode (the default)
-
- The terminology above is IBM's, but note that a color monitor
- connected to the 15 pin connector on the IBM color graphics
- adaptor will display color if the graphics mode is set to
- either 4 or 5. A composite color monitor connected to the RCA
- jack will display color only in mode 4.
-
- The IBM Enhanced Graphics Adaptor (EGA) is supported in mode 16
- (350*640 color). At least 128K of memory is assumed, so that
- 16 colors are supported. If only 64K is installed, graph
- should still work but only 4 colors will be displayed. Only
- one page is used.
-
- The Hercules monochrome graphics card is supported in its
- graphics mode (naturally). Only page 0 (memory addresses
- b0000-b7fff) is used, so another video adaptor which is mapped
- into memory above b8000 (such as an IBM CGA) can also be
- present. The card is left in mode HALF (page 1 disabled).
-
- Similarly, these modes are supported on the Z-100:
-
- SET GRAPHICS=1 ; 225*640 mode (the default)
- SET GRAPHICS=2 ; 400*640 mode
-
- For the Houstin Instruments plotter, HP plotter, or LIPS-10
- laser printer versions, the output port may be specified by
- setting an environment variable:
-
- SET plot_port=COM1 (the default)
- SET plot_port=COM2
- SET plot_port=PRN
-
- Graph asks about several other options: pen speed, pen
- displacement before plotting begins, width and height of
- desired plotting area.
-
- OPTIONS
- Options can appear before, among, or after input file names
- provided a file name cannot be mistaken for the parameter of an
- option.
-
- -a [<step> [<start>]]
- Automatically generate abscissas. The first argument,
- if present, is the step between values (default 1).
- The second argument, if present, is the starting value
- (default 0, or first argument from -x switch).
-
- -b break (disconnect) the plot after each label. (See
- switch -m to plot the line segments with different
- linestyles. To break the plot without printing labels,
- use empty labels: "".) This option is set automatically
- if more than one input file or more than one linestyle
- is specified.
-
- -c <text> argument is default label for data points
-
- -e equal vertical and horizontal scales (same number of
- inches on the display per unit in problem space), so that
- circles don't look like elipses
-
- -g -g with no arguments eliminates the grid.
-
- -g <style> <tics> <width>
- First argument is grid style: -1 for tic marks outside
- the graph area, 0 for no grid, 1 for frame with tic
- marks inside (default), 2 for full grid. Second
- argument is approximate number of small tic marks per
- numeric label (1 to 10, default 5). Set <tics> to 1 to
- eliminate small tic marks. Third argument is width of
- grid lines (default 1).
-
- -l <text> next argument is label for graph (printed at top). If the
- label starts with a double quote it may contain spaces:
- -l "three cornered hat"
-
- -m <n1> <n2> <n3>...
- numeric arguments are linestyles for successive line
- segments (see switch -b). Each positive argument is a
- number of up to three digits WCS, where
- W is the linewidth (0-9, with 0 giving width 1),
- C is the color (with 0 being brightest), and
- S is linestyle (1-5, 1 for solid, 2 for dashed,
- 3 for dotted, etc.)
- If an argument is zero, the data points are plotted as
- dots not connected by lines. Similarly, a negative
- argument -CS generates a marker:
- C is the color
- S is the marker style (dot, box, cross, etc.)
- An argument can also include a repeat count, as in 3*45
- or 4*-205.
-
- -n Omit numeric labels on axes. This uses more of the screen
- for the graph, therefore effectively increases
- resolution slightly. It may also be used when you want
- to make a hard copy and label it with a typewriter.
-
- -t Transpose x and y values before plotting (-x now refers to
- vertical axis).
-
- -x[l] [min [max [junk]]]
- If l is present, x axis is logrithmic. First argument,
- if present, is lower x limit. Second argument, if
- present, is upper x limit. A third numeric argument
- may be present but will be ignored. By default, these
- values are determined automatically.
-
- -y[l] [min [max [junk]]]
- Similarly for y axis
-
- -y[l]m [min [max [junk]]]
- -ya[p] [min [max [junk]]]
- -yp[p] [min [max [junk]]]
- Any of these signal that each line of the input
- contains the real and imaginary parts of a complex
- number (after the abscissa, unless -a is also used).
- An 'm' requests that the magnitude of the number
- (square root of sum of squares of real and imaginary
- parts) be plotted. 'p' or 'a' requests the phase
- (atan(imaginary part/real part), also known as the
- argument) be plotted. The signs of both parts are
- taken into account, so the phase ranges from -pi to
- +pi. If both real and imaginary parts are zero, the
- phase is arbitrarily assumed to be zero. An additional
- 'p' requests that the phase be divided by pi before
- plotting.
-
- -h <n> argument is the fraction of the vertical space to be
- used for the graph.
-
- -u <n> argument is the fraction of the vertical space to move
- up before plotting.
-
- -w <n> argument is the fraction of the horizontal space to be
- used for the graph (useful if screen dump routine
- doesn't dump the entire width of the screen).
-
- -r <n> argument is the fraction of the horizontal space to move
- right before plotting.
-
- FILES
- These are the currently available executable files:
- GRAPHPC.EXE IBM PC with CGA
- GRAPHEGA.EXE IBM PC with EGA
- GRAPHH.EXE IBM PC with Hercules monochrome graphics
- GRAPHZ.EXE Zenith Z-100
- GRAPHHI.EXE Houstin Instruments DMP-29 plotter
- GRAPHHP.EXE HP 7470A plotter
- GRAPHLI.EXE CIE Laser Image Printing System, or LIPS 10
-
- NOTES
- Graph is largely equivalent to the program of the same name on
- Unix, with the following exceptions: Data may come from one or
- more files rather than the standard input. Line segments that
- go out of bounds are windowed rather than being dropped. Graph
- may adjust the specified lower or upper limits (outwards) to
- give convenient axis labels. Steps along axes may not be
- specified. The screen is always cleared before plotting. The
- default grid type is frame with tics rather than full grid.
- Axes may not be reversed by specifying a lower limit greater
- than the upper limit.
-
- BUGS
- The screen is always cleared before a plot.
-
- AUTHOR
- Copyright (c) 1985, 1986, 1987 by James R. Van Zandt
- (jrv@mitre-bedford) 27 Spencer Dr., Nashua NH 03062,
- 603-888-2272. Resale forbidden, copying for personal use
- encouraged. Constructive comments welcome.
-